package com.ruoyi.http.service.impl;

import com.ruoyi.http.domain.*;
import com.ruoyi.http.mapper.WeChatMapper;
import com.ruoyi.http.service.IWeChatTService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 小区管理Service业务层处理
 *
 * @author ruoyi
 * @date 2023-04-17
 */
@Service
public class WeChatTServiceImpl implements IWeChatTService {
    @Autowired
    private WeChatMapper weChatMapper;

    @Override
    public List<WeChat01000T> selectHouseAreaTList(WeChat01000T weChat01000T) {
        return weChatMapper.selectHouseAreaTList(weChat01000T);
    }

    @Override
    public List<WeChat02300T> selectHouseAreaNPropertyList(WeChat02300T weChat02300T) {
        return weChatMapper.selectHouseAreaNPropertyList(weChat02300T);
    }

    @Override
    public List<WeChat01100T> getGroupByArea(WeChat01100T weChat01100T) {
        return weChatMapper.getGroupByArea(weChat01100T);
    }

    @Override
    public List<WeChat01200T> getUnitByAreaAndGroup(WeChat01200T weChat01200T) {
        return weChatMapper.getUnitByAreaAndGroup(weChat01200T);
    }

    @Override
    public List<WeChat01300T> getDoorByAreaAndGroupAndUnit(WeChat01300T weChat01300T) {
        return weChatMapper.getDoorByAreaAndGroupAndUnit(weChat01300T);
    }

    @Override
    public WeChat00100T getHouseIdByPapersCode(WeChat00100T weChat00100T) {
        return weChatMapper.getHouseIdByPapersCode(weChat00100T);
    }

    @Override
    public WeChat00200T getDoorInfoByHouseId(WeChat00200T weChat00200T) {
        return weChatMapper.getDoorInfoByHouseId(weChat00200T);
    }

    @Override
    public List<WeChat00300T> getCostListByHouseId(WeChat00300T weChat00300T) {
        return weChatMapper.getCostListByHouseId(weChat00300T);
    }

    @Override
    public List<WeChat00400T> getProjectListByHouseId(WeChat00400T weChat00400T) {
        return weChatMapper.getProjectListByHouseId(weChat00400T);
    }

    @Override
    public int updateOpenIdByHouseId(WeChat00100T weChat00100T) {
        return weChatMapper.updateOpenIdByHouseId(weChat00100T);
    }

    @Override
    public WeChat00500T getrateTotal(WeChat00500T weChat00500T) {
        return weChatMapper.getrateTotal(weChat00500T);
    }

    @Override
    public List<WeChat00500T> getRateInfo(WeChat00500T weChat00500T) {
        return weChatMapper.getRateInfo(weChat00500T);
    }

    @Override
    public List<WeChat00600T> getCompanyInfoAll(WeChat00600T weChat00600T) {
        return weChatMapper.getCompanyInfoAll(weChat00600T);
    }

    @Override
    public List<WeChat00700T> getProjectInfoByCompany(WeChat00700T weChat00700T) {
        return weChatMapper.getProjectInfoByCompany(weChat00700T);
    }

    @Override
    public List<WeChat02400T> getVoteTopicList(WeChat02400T weChat02400T) {
        return weChatMapper.getVoteTopicList(weChat02400T);
    }

    @Override
    public WeChat00800T getCompanyInfoByProject(WeChat00800T weChat00800T) {
        return weChatMapper.getCompanyInfoByProject(weChat00800T);
    }

    @Override
    public WeChat00800T getPriceByCompany(WeChat00800T weChat00800T) {
        return weChatMapper.getPriceByCompany(weChat00800T);
    }

    @Override
    public WeChat00900T getCompanyInfo(WeChat00900T weChat00900T) {
        return weChatMapper.getCompanyInfo(weChat00900T);
    }

    @Override
    public WeChat01400T getCostInfoByHouseId(WeChat01400T weChat01400T) {
        return weChatMapper.getCostInfoByHouseId(weChat01400T);
    }

    @Override
    public WeChat01800T getOrderInfo(WeChat01800T weChat01800T) {
        return weChatMapper.getOrderInfo(weChat01800T);
    }

    @Override
    public List<WeChat01700T> getHouseIdByOpenId(WeChat01700T weChat01700T) {
        return weChatMapper.getHouseIdByOpenId(weChat01700T);
    }

    @Override
    public List<WeChat00900T> getProjectInfoByTime(WeChat00900T weChat00900T) {
        return weChatMapper.getProjectInfoByTime(weChat00900T);
    }

    @Override
    public int insertPriceForCompany(WeChat00800T weChat00800T) {
        return weChatMapper.insertPriceForCompany(weChat00800T);
    }

    @Override
    public int updatePriceForCompany(WeChat00800T weChat00800T) {
        return weChatMapper.updatePriceForCompany(weChat00800T);
    }

    @Transactional
    @Override
    public int insertCostInfo(WeChat01500T weChat01500T) {
        WeChat01800T weChat01800T = new WeChat01800T();
        weChat01500T.setSerial(weChat01500T.getSerial());
        weChat01800T.setOrderid(weChat01500T.getOrderid());
        weChat01800T = weChatMapper.getOrderInfo(weChat01800T);
        weChat01500T.setHouseid(weChat01800T.getHouseid());
        weChat01800T.setSerial(weChat01500T.getSerial());
        weChat01500T.setPaperscode(weChat01800T.getPaperscode());
        weChat01500T.setTel(weChat01800T.getTel());
        weChat01500T.setUsername(weChat01800T.getUsername());
        weChat01500T.setCheckSts("0");
        weChatMapper.updateDoorByHouseId(weChat01500T);
        weChatMapper.updateOrderInfo(weChat01800T);
        return weChatMapper.insertCostInfoByHouseId(weChat01500T);
    }

    @Transactional
    @Override
    public int insertOrderInfo(WeChat01800T weChat01800T) {
        return weChatMapper.insertOrderInfo(weChat01800T);
    }

    @Override
    public int insertHouseVoteScoreDetail(WeChat02500T weChat02500T) {
        return weChatMapper.insertHouseVoteScoreDetail(weChat02500T);
    }

    @Override
    public WeChat02200T getHouseIdByOrderId(WeChat02200T weChat02200T) {
        return weChatMapper.getHouseIdByOrderId(weChat02200T);
    }

    @Override
    public List<WeChat01900T> getProjectByRepair(WeChat01900T weChat01900T)
    {
        return weChatMapper.getProjectByRepair(weChat01900T);
    }
    @Transactional
    @Override
    public int insertInformation(WeChat01600T weChat01600T)
    {
        return weChatMapper.insertInformation(weChat01600T);
    }

    @Transactional
    @Override
    public int insertRepairApply(WeChat02100T weChat02100T)
    {
        return weChatMapper.insertRepairApply(weChat02100T);
    }

    public int updateRepairPhoto(WeChat02000T weChat02000T)
    {
        return weChatMapper.updateRepairPhoto(weChat02000T);
    }

    public int updateCostBillByHouseId(WeChat02600T weChat02600T)
    {
        return weChatMapper.updateCostBillByHouseId(weChat02600T);
    }
}


